<html>
<head><meta charset="utf-8"><title>StroageLive/Dead · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/StroageLive.2FDead.html">StroageLive/Dead</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164536333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/StroageLive/Dead/near/164536333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/StroageLive.2FDead.html#164536333">(Apr 30 2019 at 13:00)</a>:</h4>
<p>Then I shouldn't rely on <code>StorageLive</code> to reserve space in memory for a value.</p>



<a name="164536415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/StroageLive/Dead/near/164536415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/StroageLive.2FDead.html#164536415">(Apr 30 2019 at 13:00)</a>:</h4>
<p>I assume the same can be said about <code>StorageDead</code> then</p>



<a name="164536438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/StroageLive/Dead/near/164536438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/StroageLive.2FDead.html#164536438">(Apr 30 2019 at 13:00)</a>:</h4>
<p>you can, but if there are neither of these for a local, then it lives for the entire funciton</p>



<a name="164536999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/StroageLive/Dead/near/164536999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/StroageLive.2FDead.html#164536999">(Apr 30 2019 at 13:06)</a>:</h4>
<p>Is it possible that the same local number is used for different locals in the same function? I've supposed the whole time that they don't</p>



<a name="164538924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/StroageLive/Dead/near/164538924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/StroageLive.2FDead.html#164538924">(Apr 30 2019 at 13:32)</a>:</h4>
<p>No it's not</p>



<a name="164538954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/StroageLive/Dead/near/164538954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/StroageLive.2FDead.html#164538954">(Apr 30 2019 at 13:33)</a>:</h4>
<p>basically, you can do a pre-pass over the function body; if for some local there is no storage annotation at all then imagine there was a <code>StorageLive</code> immediately at the beginning</p>



<a name="164538989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/StroageLive/Dead/near/164538989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/StroageLive.2FDead.html#164538989">(Apr 30 2019 at 13:33)</a>:</h4>
<p>Yeah, I'll take that approach</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>